<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // 删除cookie   --- 设置一个过期的时间

        const date = new Date() ;
        date.setFullYear(2000);

        document.cookie = 'name=yy;path=/;expires=' + date ;  



        // 封装 函数
        //    setCookie(name , content , days)
        //    getCookie(name)    
        //    removeCookie(name)

    </script>
    
</body>
</html>